<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:url value="/" var="baseUrl" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="img/favicon.png">
<title>黑白名单</title>
<%@include file="../include/css.jsp"%>
    <script>
function showCustomer(str)
{
  var xmlhttp;    
  if (str=="")
  {
    document.getElementById("txtHint").innerHTML="";
    return;
  }
  if (window.XMLHttpRequest)
  {
    // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
    xmlhttp=new XMLHttpRequest();
  }
  else
  {
    // IE6, IE5 浏览器执行代码
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  xmlhttp.onreadystatechange=function()
  {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
      document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
    }
  }
  xmlhttp.open("GET","ListSelectTop10?date=20170"+str,true);
  xmlhttp.send();
}
</script>
<script type="text/javascript">
function show(){
	var currentMonth = new Date().getMonth();
	var currentYear = new Date().getFullYear();
	 document.getElementById("months").value =currentMonth+1;
	 var year = document.getElementById("years");
	 
	 for (var i = 0; i <= 5; i++) {

	    	var theOption1 = document.createElement("option");
	        
	        
	        theOption1.innerHTML = currentYear-i;

	        theOption1.value = currentYear-i;
	        year.appendChild(theOption1);
	       

	    }
}

</script>
  </head>

  <body onload="show()">


  <!-- container section start -->
  <section id="container" class="">
<%@include file="../include/header.jsp"%>
		<%@include file="../include/sidebar.jsp"%>


      <!--main content start-->
      <section id="main-content">
          <section class="wrapper">
              <!--overview start-->

            <!--/.row-->

            <!--/.row--><!-- Today status end --><!-- statics end -->
              <!--主显示区域--开始-->
            	<form action="${baseUrl}front/ListTop10" method="post">
		
	<div align="center">
		<label>请选择记录日期  :</label>
    
   <select class="easyui-combobox" id="years" name="select" panelHeight="auto" style="    width:60px; padding-top:5px; margin-top:10px;">

  </select>年
  <select class="easyui-combobox" id="months" name="select" onchange="showCustomer(this.value)" panelHeight="auto" style="    width:40px; padding-top:5px; margin-top:10px;">
<option value="1">01</option> 
<option value="2">02</option> 
<option value="3">03</option> 
<option value="4">04</option> 
<option value="5">05</option> 
<option value="6">06</option> 
<option value="7">07</option>
<option value="8">08</option> 
<option value="9">09</option>
<option value="10">10</option> 
<option value="11">11</option> 
<option value="12">12</option>   
  </select>月 
  </div>

    <div id="txtHint">
		 <header class="panel-heading">
    <div style="display: inline-block; width: 90%; text-align: center">日平均流量TOP10</div>
    <div style="display: inline-block"><a href="ExportTopOfAvgFlow">[导出明细]</a></div>
    </header>
		<table class="table table-striped table-advance table-hover">
			<tbody>  

    
			<tr>
			<th>地市</th>
				<th>账号</th>
				
				<th>天数</th>
				
				<th>平均每天流量</th>
				
				
				
			</tr>
		<c:forEach items="${paging2.datas}" var="AvgFlow" varStatus="status">
				<tr>
				<td>${AvgFlow.city}</td>
					<td>${AvgFlow.account}</td>
					
					<td>${AvgFlow.days}</td>
					
					<td>${AvgFlow.avgFlow}</td>
					
					
				</tr>
			</c:forEach>
			</tbody>
		</table>
     
     
      <header class="panel-heading">
    <div style="display: inline-block; width: 90%; text-align: center">月总流量TOP10</div>
    <div style="display: inline-block"><a href="ExportInfoOfSameMac">[导出明细]</a></div>
    </header>
		<table class="table table-striped table-advance table-hover">
			<tbody>  

    
			<tr>
			<th>地市</th>
				<th>账号</th>
				<th>天数</th>
				<th>总流量</th>
				
				
				
				
				
			</tr>
		<c:forEach items="${paging3.datas}" var="AvgFlow" varStatus="status">
				<tr>
				<td>${AvgFlow.city}</td>
					<td>${AvgFlow.account}</td>
					
					<td>${AvgFlow.days}</td>
					<td>${AvgFlow.sumFlow}</td>
					
					
				</tr>
			</c:forEach>
			</tbody>
		</table>
     
     <header class="panel-heading">
    <div style="display: inline-block; width: 90%; text-align: center">SIG共享接入TOP10</div>
    <div style="display: inline-block"><a href="ExportInfoOfSameMac">[导出明细]</a></div>
    </header>
		<table class="table table-striped table-advance table-hover">
			<tbody>  

    
			<tr>
			<th>地市</th>
				<th>账号</th>
				
				<th>最大累计主机数</th>
				<th>最大并发主机数</th>
											
				
			</tr>
		<c:forEach items="${paging4.datas}" var="SigData" varStatus="status">
				<tr>
				<td>${SigData.city}</td>
					<td>${SigData.account}</td>
					
					<td>${SigData.maxSumHostOfMonth}</td>
					<td>${SigData.maxHostOfMonth}</td>
					
					
					
				</tr>
			</c:forEach>
			</tbody>
		</table>
     
     <div class="row">
    <div class="col-lg-12">
    <section class="panel">
    <header class="panel-heading">
    <div style="display: inline-block; width: 90%; text-align: center">虚拟拨号TOP10</div>
    <div style="display: inline-block"><a href="ExportInfoOfSameMac">[导出明细]</a></div>
    </header>


    <table class="table table-striped table-advance table-hover">
    <tbody>
    <tr>
    <th>BAS</th>
    <th>MAC</th>
    <th>连续相似MAC数量</th>
    <th>明细</th>
    </tr>
    <c:forEach items="${paging.datas}" var="SameMac" varStatus="status">
        <tr>
        <td>${SameMac.basIp}</td>
        <td>${SameMac.mac}</td>
        <td>${SameMac.count}</td>
        <td>
        <a class="btn btn-primary" href="ListAccountOfSameMac?basIp=${SameMac.basIp}&leftMac=${SameMac.mac}">查看</a>
        </td>
        </tr>
    </c:forEach>

    </tbody>
    </table>
    </section>
    </div>
    </div>
    	
</div>
	</form>

              <!-- project team & activity start -->

              <br>
              <br>
              <!-- project team & activity end -->
			  <!--主显示区域--结束-->
          </section>
      </section>
      <!--main content end-->
  </section>
  <!-- container section start -->

    <%@include file="../include/scripts.jsp"%>

  </body>
</html>
